import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:new_yuqib_app/yqbConfig/file_path.dart';
import 'package:new_yuqib_app/yqbView/HomeView/view.dart';
import 'package:new_yuqib_app/yqbView/MineView/view.dart';
import 'package:new_yuqib_app/yqbView/WzView/view.dart';

class IndexViewController extends GetxController {
  final index = 0.obs;

  final botBarItems = [
    BottomNavigationBarItem(
      icon: Image.asset(FilePath.index1Path, width: 22),
      activeIcon: Image.asset(FilePath.index1sPath, width: 22),
      label: "首页",
    ),
    BottomNavigationBarItem(
      icon: Image.asset(FilePath.index2Path, width: 22),
      activeIcon: Image.asset(FilePath.index2sPath, width: 22),
      label: "文章",
    ),
    BottomNavigationBarItem(
      icon: Image.asset(FilePath.index3Path, width: 22),
      activeIcon: Image.asset(FilePath.index3sPath, width: 22),
      label: "我的",
    ),
  ];

  final indexPages = [const HomeView(), const ArticleView(), const MineView()];

  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {}

  void changeIndex(int value) {
    index.value = value;
  }
}
